<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增风险点定义')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-point-add">
            <input name="errorTypeId" type="hidden" id="errorTypeId"/>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">差错类型：</label>
                        <div class="col-xs-8">
                             <select id="paeaErType" class="form-control select2-multiple" multiple>
                                <option th:each="paeaErType:${paeaErTypes}" th:value="${paeaErType.id}" th:text="${paeaErType.typeName}" ></option>
                            </select>
                        </div>
                    </div>


            <div class="form-group">    
                <label class="col-sm-3 control-label">差错点代码：</label>
                <div class="col-sm-8">
                    <input name="code" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">差错点名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">差错点描述：</label>
                <div class="col-sm-8">
                    <input name="description" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_para_status')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">差错点分类代码：</label>
                <div class="col-sm-8">
                    <input name="busyCode" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">差错点分类名称：</label>
                <div class="col-sm-8">
                    <input name="busyName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风险等级：</label>
                <div class="col-sm-8">
                    <input name="gradeId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">级别：</label>
                <div class="col-sm-8">
                    <input name="grade" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">期限：</label>
                <div class="col-sm-8">
                    <input name="limitDay" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">流程环节(scan-扫描；input-补录；forceInput-强补；other-其他)：</label>
                <div class="col-sm-8">
                    <input name="processNode" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "er/paeaErPoint"
        $("#form-point-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            $("#errorTypeId").val($.form.selectSelects("paeaErType"));
            if ($.validate.form()) {

                var data = $("#form-point-add").serializeArray();
                $.operate.save(prefix + "/add",data);
            }
        }

        $(function() {
            $('#paeaErType').select2({
                placeholder: "请选择",
                allowClear: true
            });
        })
    </script>
</body>
</html>